﻿using ConsoleApp._0331.LockUt;
using ConsoleApp._0605;
using ConsoleApp.Cache;
using ConsoleApp.多线程;
using ConsoleApp.多线程锁;
using System.Diagnostics;
using ConsoleApp._0616;
using ConsoleApp.Adapter;
using WebA.Business;
using ConsoleApp._0701;
using ConsoleApp.对比较;
using ConsoleApp.动态属性;
using System.Net;
using Lee.Utility.Extensions;
using ConsoleApp._20230302;
using ConsoleApp.IfElse;
using ConsoleApp.Gof.MapFunction;
using ConsoleApp.智能枚举;
using ServiceStack;
using ConsoleApp.数据结构;


WorkQueue workQueue = new WorkQueue();
workQueue.Enqueue(() => {
	//执行过程
	Stopwatch sw = new Stopwatch(); sw.Start();
	 

	Thread.Sleep(1000 * 30);

	sw.Stop();

	Console.WriteLine($"耗时：{sw.Elapsed}");

});


SortedListTest.Main();

object data = new { aa1 = "lil", aa2 = 666 };


var ttttt1 = data;

SmartEnumsTests.Use();


//AiApp.main();

var a = 0;
var b = 5;
var c = 1;
 

var e = b - c + 5;


var f = 0;



//QueryGrantTypeService queryGrant = new();

//var aaaa= queryGrant.getResult("购物券");


//IfElseTest elseTest = new IfElseTest();

//elseTest.testB();

//elseTest.ShowMsg("BToDao");



//TestMain.Main();

//var t66 = "2023-01-01 20:59:59".ParseToDateTime();


//var t77 = "2023-01-01 23:59:59".ParseToDateTime();


//var ttr = t66 > t77;

//var ttr2 = t66 < t77;

//Thread th1 = new Thread(new ThreadStart(paramsTest.testTime));

//th1.Start();



//Stopwatch sw = new Stopwatch(); sw.Start();

//Thread.Sleep(1000 * 60 * 10);

//sw.Stop();

//Console.WriteLine($"耗时：{sw.Elapsed}");

//sw.Start();

//Thread.Sleep(1000 * 30);

//sw.Stop();

//Console.WriteLine($"耗时：{sw.Elapsed}");

//var aa = DateTime.Now.AddMonths(-3);

//var bbb = "2023-01-01".ParseToDateTime().AddMonths(-3);

//var bbbbbb = "2023-01-01".ParseToDateTime().AddMonths(-3);

//var bbbbbbc = "2023-01-01".ParseToDateTime().AddMonths(-3);

//int x = 20;

//x &= 23;

//Console.WriteLine(x);

//int y = 20;
//y &= 20;

//Console.WriteLine(y);

//int z = 20;
//z &= 16;

//Console.WriteLine(z);




//string id = "411111111";

//var rest = IDCardExtensions.TestCardId(id);


Console.WriteLine("Hello, World!");


//var data = await GetFromCache().WaitAsync(TimeSpan.FromMilliseconds(milliseconds));

//await HttpConnectionPoolingSamples.PoolingSamplesMain();
//Console.WriteLine("Hello, World!");

//await HttpConnectionPoolingSamples.PoolingSamplesMain2();

//Console.WriteLine("Hello, World!");

//await HttpConnectionPoolingSamples.PoolingSamplesMain3();

//Console.WriteLine("Hello, World!");

//var name = Dns.GetHostName();
//var ips = Dns.GetHostAddressesAsync(name);


//var list = ips.Result;



//ConsoleApp.数据结构.CollectionDemo.Show();

//Console.WriteLine("Hello, World!");

//TestJson.jsonEqual();

//ConsoleApp.事件.MainTest.Main();

//ConsoleApp.多播委托.MainTest.Main();

//var processMonth = 202208;

//var mrStartDate = Convert.ToDateTime("2021-12-31");
//DateTime targetDate = new DateTime();
//DateTime.TryParseExact(processMonth.ToString(), "yyyyMM", System.Globalization.CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.None, out targetDate);


//DateTime endCitationDate = Convert.ToDateTime(targetDate.AddDays(-1).ToString("yyyy-MM-dd") + " 23:59:59");
//DateTime startCitationDate = targetDate.AddYears(-1).Date;




//paramsTest.testMain();
//Console.WriteLine("Hello, World!");

//PadLeftTest.testMain();

//Console.WriteLine("Hello, World!");

//var test3 = new yield_3_test();
//test3.Init();

//var test2=new yield_2_Test();

//test2.testMain();

//Console.WriteLine("Hello, World!");

//ChannelTest test=new ChannelTest();
//test.testMain();

//Console.WriteLine("Hello, World!");

//Test test=new Test();

//test.责任链工厂Start();


//Console.WriteLine("Hello, World!");

//AdapterTests.TestMain();

//ClosureTests.TestMain();

//yieldTest.testMain();



//MemoryCacheB.MemoryCacheTest();

//SqlConnectionTest sqlConnectionTest =new SqlConnectionTest();
//sqlConnectionTest.tes

//SqlConnectionTest.TestSQLServerConnectionCount();


//RemoteService remoteService = new RemoteService();
//remoteService.startService();

//Console.WriteLine("Hello, World!");

//ScheduleTask scheduleTask = new ScheduleTask();
//scheduleTask.ScheduleTaskMain();





//MemoryCacheA.MemoryCacheTest();
//MemoryCacheB.MemoryCacheTest();

//Console.WriteLine("Hello, World!");



//LockTest lockTest = new LockTest();

//lockTest.qiangdan();

//MonitorTest monitorTest = new MonitorTest();

//monitorTest.qiangdan();

//RedisLockTest redisTest = new RedisLockTest();

//redisTest.qiangdan();


//ThreadTestA.GetIncrement();

//AtomicityForLockTest.AtomicityForLock();

//AtomicityForCASTest.AtomicityForInterLock();

//AtomicityForCASTest.AtomicityForMyCalc();


//SpinklockTest.Spinklock();

//TaskDemoA.TaskMain();

///TaskDemoB.TaskMain();

//TaskDemoC taskDemoC = new TaskDemoC();
//taskDemoC.GetStringAsync();

//TaskDemo taskDemo=new TaskDemo();
//await taskDemo.GetTaskRun();

//taskDemo.CancelTask();



//int y = 10;

////Func<int, int> sum = x =>
////{
////    return x + y;
////};

////面向对象改造
//FuncClass funcClass = new FuncClass() { y = y };

//Func<int, int> sum = funcClass.Run;

//Console.WriteLine(sum(11));

